<?php

use yii\helpers\Html;
use yii\widgets\DetailView;


$this->title = '现场服务经理详情';
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Product Serves'), 'url' => ['index','product_id'=>$model->product_id]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-serve-view">

<div class="box">
        <div class="box-header">
        <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        </div>
        <div class="box-body">
        <?= DetailView::widget([
            'model' => $model,
            'attributes' => [
                'product.code',
                'product.name',
                'begin_date',
                'end_date',
                [
                      'attribute' => 'city',
                      'value' => function($model){

                            return $model->cityInfo;
                      }
                ],
                [
                      'attribute' => 'member_id',
                      'value' => function($model){

                            return $model->memberInfo;
                      }
                ],
                [
                      'attribute' => 'user_id',
                      'value' => function($model){

                            return isset($model->user) ? $model->user->name : '管理员';
                      }
                ],
                'created_at',
                'updated_at',
            ],
        ]) ?>
        </div>
    </div>
</div>

